package com.app.mapper;

import com.app.model.ProjectModel;
import com.app.model.StatusModel;
import com.app.model.SystemModel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface ProjectProgressMapper extends BaseMapper<ProjectModel> {
    List<ProjectModel> getLIstByModel(ProjectModel model);

    int getCountByModel(ProjectModel model);

    List<ProjectModel> getList(ProjectModel model);

    int getCount(ProjectModel model);

    List<ProjectModel> getListByKey(ProjectModel model);

    int getCountByKey(ProjectModel model);

    List<ProjectModel> getListByTime(ProjectModel model);

    int getCountByTime(ProjectModel model);

    @Insert("insert into lm_status(status,remarks,project_id)values (#{status},#{remarks},#{id})")
    void saveStatus(int status, String remarks, int id);

    List<StatusModel> getStatus(Integer projectId);

    List<SystemModel> getProjectClass();

    List<SystemModel> getProjectType();

    List<SystemModel> getStatusList();

    List<ProjectModel> getByTimeAndName(ProjectModel model);

    int getCountByTimeAndName(ProjectModel model);


    List<ProjectModel> getProjectByStatus(Integer status,String year);


   int updateProject(List<StatusModel> modelList);


    int selectRed(String year);

    int selectBlue(String year);

    int selectYellow(String year);

    int selectByYear(String year);

    Integer selectCountByType(int id, String year);

    List<ProjectModel> search(String keyword);

    List<ProjectModel> select(int id);
}
